'use strict'

const path = require('path');
const wechat_file = path.join(__dirname, 'config/wechat.txt');
const util = require('./libs/util');

const config = {
    wechat: {
        appID: 'wx7dab407406308bf5',
        appSecret: 'e48b4ccb411deb26ffe4263cf8c2a7f3',
        token: 'lvjiaxuan',
        getAccessToken() {
            return util.readFileAsync(wechat_file);
        },
        saveAccessToken(data) {
            data = JSON.stringify(data);
            return util.writeFileAsync(wechat_file, data);
        }
    }
};

module.exports = config;
